import os

def count_likes(file_path):
    like_count = {}
    with open(file_path, 'r', encoding='utf-8') as fin:
        for line in fin:
            line = line.strip()
            if not line: 
                continue
            parts = line.split(" ")
            if len(parts) < 2:
                continue
            likes = parts[1].split(",")
            for like in likes:
                like_count[like] = like_count.get(like, 0) + 1
    return like_count

def main():
    file_path = os.path.join(os.getcwd(), "01-exercise", "21-40", "data", "student_like.txt")
    result = count_likes(file_path)
    for interest, count in result.items():
        print(f"{interest}: {count}")

if __name__ == "__main__":
    main()